glGetBooleanv, glGetDoublev, glGetFloatv, glGetIntegerv

[New - Windows 95, OEM Service Release 2]

These functions return the value or values of a selected parameter.

void glGetBooleanv(

    GLenum pname,

 

    GLboolean * params

 

   );

 

 

void glGetDoublev(

    GLenum pname,

 

    GLdouble * params

 

   );

 

 

void glGetFloatv(

    GLenum pname,

 

    GLfloat * params

 

   );

 

 

void glGetIntegerv(

    GLenum pname,

 

    GLint * params

 

   );

 

 

Parameters

pname

The parameter value to be returned. The following symbolic constants are accepted:

GL_ACCUM_ALPHA_BITS

The params parameter returns one value: the number of alpha bitplanes in the accumulation buffer.

GL_ACCUM_BLUE_BITS

The params parameter returns one value: the number of blue bitplanes in the accumulation buffer.

GL_ACCUM_CLEAR_VALUE

The params parameter returns four values: the red, green, blue, and alpha values used to clear the accumulation buffer. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glClearAccum1N1H2PA.

GL_ACCUM_GREEN_BITS

The params parameter returns one value: the number of green bitplanes in the accumulation buffer.

GL_ACCUM_RED_BITS

The params parameter returns one value: the number of red bitplanes in the accumulation buffer.

GL_ALPHA_BIAS

The params parameter returns one value: the alpha bias factor used during pixel transfers. See glPixelTransfer6MW9.AX.

GL_ALPHA_BITS

The params parameter returns one value: the number of alpha bitplanes in each color buffer.

GL_ALPHA_SCALE

The params parameter returns one value: the alpha scale factor used during pixel transfers. See glPixelTransfer.

GL_ALPHA_TEST

The params parameter returns a single Boolean value indicating whether alpha testing of fragments is enabled. See glAlphaFunc3OLHFW4.

GL_ALPHA_TEST_FUNC

The params parameter returns one value: the symbolic name of the alpha test function. See glAlphaFunc.

GL_ALPHA_TEST_REF

The params parameter returns one value: the reference value for the alpha test. See glAlphaFunc3OLHFW4. An integer value, if requested, is linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value.

GL_ATTRIB_STACK_DEPTH

The params parameter returns one value: the depth of the attribute stack. If the stack is empty, zero is returned. See glPushAttrib2Z6IY_.

GL_AUTO_NORMAL

The params parameter returns a single Boolean value indicating whether 2-D map evaluation automatically generates surface normals. See glMap2E5BV.I.

GL_AUX_BUFFERS

The params parameter returns one value: the number of auxiliary color buffers.

GL_BLEND

The params parameter returns a single Boolean value indicating whether blending is enabled. See glBlendFuncIXY.WO.

GL_BLEND_DST

The params parameter returns one value: the symbolic constant identifying the destination blend function. See glBlendFunc.

GL_BLEND_SRC

The params parameter returns one value: the symbolic constant identifying the source blend function. See glBlendFuncIXY.WO.

GL_BLUE_BIAS

The params parameter returns one value: the blue bias factor used during pixel transfers. See glPixelTransfer6MW9.AX.

GL_BLUE_BITS

The params parameter returns one value: the number of blue bitplanes in each color buffer.

GL_BLUE_SCALE

The params parameter returns one value: the blue scale factor used during pixel transfers. See glPixelTransfer.

GL_CLIP_PLANEi

The params parameter returns a single Boolean value indicating whether the specified clipping plane is enabled. See glClipPlane6HCR6N.

GL_COLOR_CLEAR_VALUE

The params parameter returns four values: the red, green, blue, and alpha values used to clear the color buffers. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glClearColor3OOM00K.

GL_COLOR_MATERIAL

The params parameter returns a single Boolean value indicating whether one or more material parameters are tracking the current color. See glColorMaterial2U57YMP.

GL_COLOR_MATERIAL_FACE

The params parameter returns one value: a symbolic constant indicating which materials have a parameter that is tracking the current color. See glColorMaterial.

GL_COLOR_MATERIAL_PARAMETER

The params parameter returns one value: a symbolic constant indicating which material parameters are tracking the current color. See glColorMaterial2U57YMP.

GL_COLOR_WRITEMASK

The params parameter returns four Boolean values: the red, green, blue, and alpha write enables for the color buffers. See glColorMask1M7XSWA.

GL_CULL_FACE

The params parameter returns a single Boolean value indicating whether polygon culling is enabled. See glCullFaceOMBWE.

GL_CULL_FACE_MODE

The params parameter returns one value: a symbolic constant indicating which polygon faces are to be culled. See glCullFace.

GL_CURRENT_COLOR

The params parameter returns four values: the red, green, blue, and alpha values of the current color. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glColorOOTFYK.

GL_CURRENT_INDEX

The params parameter returns one value: the current color index. See glIndex45Y9.CK.

GL_CURRENT_NORMAL

The params parameter returns three values: the x, y, and z values of the current normal. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glNormal2NHAN7.

GL_CURRENT_RASTER_COLOR

The params parameter returns four values: the red, green, blue, and alpha values of the current raster position. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glRasterPos_TX06I.

GL_CURRENT_RASTER_DISTANCE

The params parameter returns one value: the distance from the eye to the current raster position. See glRasterPos.

GL_CURRENT_RASTER_INDEX

The params parameter returns one value: the color index of the current raster position. See glRasterPos_TX06I.

GL_CURRENT_RASTER_POSITION

The params parameter returns four values: the x, y, z, and w components of the current raster position. The x, y, and z components are in window coordinates, and w is in clip coordinates. See glRasterPos.

GL_CURRENT_RASTER_TEXTURE_COORDS

The params parameter returns four values: the s, t, r, and q current raster texture coordinates. See glRasterPos_TX06I and glTexCoordFFHXD1.

GL_CURRENT_RASTER_POSITION_VALID

The params parameter returns a single Boolean value indicating whether the current raster position is valid. See glRasterPos_TX06I.

GL_CURRENT_TEXTURE_COORDS

The params parameter returns four values: the s, t, r, and q current texture coordinates. See glTexCoordFFHXD1.

GL_DEPTH_BIAS

The params parameter returns one value: the depth bias factor used during pixel transfers. See glPixelTransfer6MW9.AX.

GL_DEPTH_BITS

The params parameter returns one value: the number of bitplanes in the depth buffer.

GL_DEPTH_CLEAR_VALUE

The params parameter returns one value: the value that is used to clear the depth buffer. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glClearDepth4AYO_VQ.

GL_DEPTH_FUNC

The params parameter returns one value: the symbolic constant that indicates the depth comparison function. See glDepthFuncC4GZX.

GL_DEPTH_RANGE

The params parameter returns two values: the near and far mapping limits for the depth buffer. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glDepthRange1RRKZ50.

GL_DEPTH_SCALE

The params parameter returns one value: the depth scale factor used during pixel transfers. See glPixelTransfer6MW9.AX.

GL_DEPTH_TEST

The params parameter returns a single Boolean value indicating whether depth testing of fragments is enabled. See glDepthFuncC4GZX and glDepthRange1RRKZ50.

GL_DEPTH_WRITEMASK

The params parameter returns a single Boolean value indicating if the depth buffer is enabled for writing. See glDepthMaskMLG3LE.

GL_DITHER

The params parameter returns a single Boolean value indicating whether dithering of fragment colors and indexes is enabled.

GL_DOUBLEBUFFER

The params parameter returns a single Boolean value indicating whether double buffering is supported.

GL_DRAW_BUFFER

The params parameter returns one value: a symbolic constant indicating which buffers are being drawn to. See glDrawBufferXDQ_WV.

GL_EDGE_FLAG

The params parameter returns a single Boolean value indicating whether the current edge flag is true or false. See glEdgeFlag1K93P2N.

GL_FOG

The params parameter returns a single Boolean value indicating whether fogging is enabled. See glFog8KNK3J.

GL_FOG_COLOR

The params parameter returns four values: the red, green, blue, and alpha components of the fog color. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glFog.

GL_FOG_DENSITY

The params parameter returns one value: the fog density parameter. See glFog.

GL_FOG_END

The params parameter returns one value: the end factor for the linear fog equation. See glFog.

GL_FOG_HINT

The params parameter returns one value: a symbolic constant indicating the mode of the fog hint. See glHint2FQ71VE.

GL_FOG_INDEX

The params parameter returns one value: the fog color index. See glFog8KNK3J.

GL_FOG_MODE

The params parameter returns one value: a symbolic constant indicating which fog equation is selected. See glFog.

GL_FOG_START

The params parameter returns one value: the start factor for the linear fog equation. See glFog8KNK3J.

GL_FRONT_FACE

The params parameter returns one value: a symbolic constant indicating whether clockwise or counterclockwise polygon winding is treated as front-facing. See glFrontFaceH0SHHH.

GL_GREEN_BIAS

The params parameter returns one value: the green bias factor used during pixel transfers.

GL_GREEN_BITS

The params parameter returns one value: the number of green bitplanes in each color buffer.

GL_GREEN_SCALE

The params parameter returns one value: the green scale factor used during pixel transfers. See glPixelTransfer6MW9.AX.

GL_INDEX_BITS

The params parameter returns one value: the number of bitplanes in each color-index buffer.

GL_INDEX_CLEAR_VALUE

The params parameter returns one value: the color index used to clear the color-index buffers. See glClearIndex4B3X1H6.

GL_INDEX_MODE

The params parameter returns a single Boolean value indicating whether OpenGL is in color-index mode (TRUE) or RGBA mode (FALSE).

GL_INDEX_OFFSET

The params parameter returns one value: the offset added to color and stencil indexes during pixel transfers. See glPixelTransfer6MW9.AX.

GL_INDEX_SHIFT

The params parameter returns one value: the amount that color and stencil indexes are shifted during pixel transfers. See glPixelTransfer.

GL_INDEX_WRITEMASK

The params parameter returns one value: a mask indicating which bitplanes of each color-index buffer can be written. See glIndexMask4Y9K_FK.

GL_LIGHTi

The params parameter returns a single Boolean value indicating whether the specified light is enabled. See glLightOXNARM and glLightModel21E1NBY.

GL_LIGHTING

The params parameter returns a single Boolean value indicating whether lighting is enabled. See glLightModel.

GL_LIGHT_MODEL_AMBIENT

The params parameter returns four values: the red, green, blue, and alpha components of the ambient intensity of the entire scene. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glLightModel21E1NBY.

GL_LIGHT_MODEL_LOCAL_VIEWER

The params parameter returns a single Boolean value indicating whether specular reflection calculations treat the viewer as being local to the scene. See glLightModel.

GL_LIGHT_MODEL_TWO_SIDE

The params parameter returns a single Boolean value indicating whether separate materials are used to compute lighting for front- and back-facing polygons. See glLightModel21E1NBY.

GL_LINE_SMOOTH

The params parameter returns a single Boolean value indicating whether antialiasing of lines is enabled. See glLineWidthD7DWCH.

GL_LINE_SMOOTH_HINT

The params parameter returns one value: a symbolic constant indicating the mode of the line antialiasing hint. See glHint2FQ71VE.

GL_LINE_STIPPLE

The params parameter returns a single Boolean value indicating whether stippling of lines is enabled. See glLineStipple7PZ0SH.

GL_LINE_STIPPLE_PATTERN

The params parameter returns one value: the 16-bit line stipple pattern. See glLineStipple.

GL_LINE_STIPPLE_REPEAT

The params parameter returns one value: the line stipple repeat factor. See glLineStipple7PZ0SH.

GL_LINE_WIDTH

The params parameter returns one value: the line width as specified with glLineWidthD7DWCH.

GL_LINE_WIDTH_GRANULARITY

The params parameter returns one value: the width difference between adjacent supported widths for antialiased lines. See glLineWidth.

GL_LINE_WIDTH_RANGE

The params parameter returns two values: the smallest and largest supported widths for antialiased lines. See glLineWidthD7DWCH.

GL_LIST_BASE

The params parameter returns one value: the base offset added to all names in arrays presented to glCallLists. See glListBase3FV30YY.

GL_LIST_INDEX

The params parameter returns one value: the name of the display list currently under construction. Zero is returned if no display list is currently under construction. See glNewListC1GWNO.

GL_LIST_MODE

The params parameter returns one value: a symbolic constant indicating the construction mode of the display list currently being constructed. See glNewList.

GL_LOGIC_OP

The params parameter returns a single Boolean value indicating whether fragment indexes are merged into the frame buffer using a logical operation. See glLogicOpN__P0P.

GL_LOGIC_OP_MODE

The params parameter returns one value: a symbolic constant indicating the selected logic operational mode. See glLogicOp.

GL_MAP1_COLOR_4

The params parameter returns a single Boolean value indicating whether 1-D evaluation generates colors. See glMap1E5BV.H.

GL_MAP1_GRID_DOMAIN

The params parameter returns two values: the endpoints of the 1-D maps grid domain. See glMapGrid22OH3KT.

GL_MAP1_GRID_SEGMENTS

The params parameter returns one value: the number of partitions in the 1-D maps grid domain. See glMapGrid.

GL_MAP1_INDEX

The params parameter returns a single Boolean value indicating whether 1-D evaluation generates color indexes. See glMap1E5BV.H.

GL_MAP1_NORMAL

The params parameter returns a single Boolean value indicating whether 1-D evaluation generates normals. See glMap1.

GL_MAP1_TEXTURE_COORD_1

The params parameter returns a single Boolean value indicating whether 1-D evaluation generates 1-D texture coordinates. See glMap1E5BV.H.

GL_MAP1_TEXTURE_COORD_2

The params parameter returns a single Boolean value indicating whether 1-D evaluation generates 2-D texture coordinates. See glMap1.

GL_MAP1_TEXTURE_COORD_3

The params parameter returns a single Boolean value indicating whether 1-D evaluation generates 3-D texture coordinates. See glMap1E5BV.H.

GL_MAP1_TEXTURE_COORD_4

The params parameter returns a single Boolean value indicating whether 1-D evaluation generates 4-D texture coordinates. See glMap1.

GL_MAP1_VERTEX_3

The params parameter returns a single Boolean value indicating whether 1-D evaluation generates 3-D vertex coordinates. See glMap1E5BV.H.

GL_MAP1_VERTEX_4

The params parameter returns a single Boolean value indicating whether 1-D evaluation generates 4-D vertex coordinates. See glMap1.

GL_MAP2_COLOR_4

The params parameter returns a single Boolean value indicating whether 2-D evaluation generates colors. See glMap2E5BV.I.

GL_MAP2_GRID_DOMAIN

The params parameter returns four values: the endpoints of the 2-D maps i and j grid domains. See glMapGrid22OH3KT.

GL_MAP2_GRID_SEGMENTS

The params parameter returns two values: the number of partitions in the 2-D maps i and j grid domains. See glMapGrid.

GL_MAP2_INDEX

The params parameter returns a single Boolean value indicating whether 2-D evaluation generates color indexes. See glMap2E5BV.I.

GL_MAP2_NORMAL

The params parameter returns a single Boolean value indicating whether 2-D evaluation generates normals. See glMap2.

GL_MAP2_TEXTURE_COORD_1

The params parameter returns a single Boolean value indicating whether 2-D evaluation generates 1-D texture coordinates. See glMap2E5BV.I.

GL_MAP2_TEXTURE_COORD_2

The params parameter returns a single Boolean value indicating whether 2-D evaluation generates 2-D texture coordinates. See glMap2.

GL_MAP2_TEXTURE_COORD_3

The params parameter returns a single Boolean value indicating whether 2-D evaluation generates 3-D texture coordinates. See glMap2E5BV.I.

GL_MAP2_TEXTURE_COORD_4

The params parameter returns a single Boolean value indicating whether 2-D evaluation generates 4-D texture coordinates. See glMap2.

GL_MAP2_VERTEX_3

The params parameter returns a single Boolean value indicating whether 2-D evaluation generates 3-D vertex coordinates. See glMap2E5BV.I.

GL_MAP2_VERTEX_4

The params parameter returns a single Boolean value indicating whether 2-D evaluation generates 4-D vertex coordinates. See glMap2.

GL_MAP_COLOR

The params parameter returns a single Boolean value indicating whether colors and color indexes are to be replaced by table lookup during pixel transfers. See glPixelTransfer6MW9.AX.

GL_MAP_STENCIL

The params parameter returns a single Boolean value indicating whether stencil indexes are to be replaced by table lookup during pixel transfers. See glPixelTransfer.

GL_MATRIX_MODE

The params parameter returns one value: a symbolic constant indicating which matrix stack is currently the target of all matrix operations. See glMatrixMode20CZ15.

GL_MAX_ATTRIB_STACK_DEPTH

The params parameter returns one value: the maximum supported depth of the attribute stack. See glPushAttrib2Z6IY_.

GL_MAX_CLIP_PLANES

The params parameter returns one value: the maximum number of application-defined clipping planes. See glClipPlane6HCR6N.

GL_MAX_EVAL_ORDER

The params parameter returns one value: the maximum equation order supported by 1-D and 2-D evaluators. See glMap1E5BV.H and glMap2E5BV.I.

GL_MAX_LIGHTS

The params parameter returns one value: the maximum number of lights. See glLightOXNARM.

GL_MAX_LIST_NESTING

The params parameter returns one value: the maximum recursion depth allowed during display-list traversal. See glCallList1PKP.MP.

GL_MAX_MODELVIEW_STACK_DEPTH

The params parameter returns one value: the maximum supported depth of the modelview matrix stack. See glPushMatrix1MYNI2H.

GL_MAX_NAME_STACK_DEPTH

The params parameter returns one value: the maximum supported depth of the selection name stack. See glPushName2NWF5ZP.

GL_MAX_PIXEL_MAP_TABLE

The params parameter returns one value: the maximum supported size of a glPixelMap lookup table. See glPixelMap113L0UI.

GL_MAX_PROJECTION_STACK_DEPTH

The params parameter returns one value: the maximum supported depth of the projection matrix stack. See glPushMatrix1MYNI2H.

GL_MAX_TEXTURE_SIZE

The params parameter returns one value: the maximum width or height of any texture image (without borders). See glTexImage1D1HIX0MK and glTexImage2D1HIX0NK.

GL_MAX_TEXTURE_STACK_DEPTH

The params parameter returns one value: the maximum supported depth of the texture matrix stack. See glPushMatrix1MYNI2H.

GL_MAX_VIEWPORT_DIMS

The params parameter returns two values: the maximum supported width and height of the viewport. See glViewport3RI8.C6.

GL_MODELVIEW_MATRIX

The params parameter returns 16 values: the modelview matrix on the top of the modelview matrix stack. See glPushMatrix1MYNI2H.

GL_MODELVIEW_STACK_DEPTH

The params parameter returns one value: the number of matrices on the modelview matrix stack. See glPushMatrix.

GL_NAME_STACK_DEPTH

The params parameter returns one value: the number of names on the selection name stack. See glPushMatrix1MYNI2H.

GL_NORMALIZE

The params parameter returns a single Boolean value indicating whether normals are automatically scaled to unit length after they have been transformed to eye coordinates. See glNormal2NHAN7.

GL_PACK_ALIGNMENT

The params parameter returns one value: the byte alignment used for writing pixel data to memory. See glPixelStoreNHM7UO.

GL_PACK_LSB_FIRST

The params parameter returns a single Boolean value indicating whether single-bit pixels being written to memory are written first to the least significant bit of each unsigned byte. See glPixelStore.

GL_PACK_ROW_LENGTH

The params parameter returns one value: the row length used for writing pixel data to memory. See glPixelStoreNHM7UO.

GL_PACK_SKIP_PIXELS

The params parameter returns one value: the number of pixel locations skipped before the first pixel is written into memory. See glPixelStore.

GL_PACK_SKIP_ROWS

The params parameter returns one value: the number of rows of pixel locations skipped before the first pixel is written into memory. See glPixelStoreNHM7UO.

GL_PACK_SWAP_BYTES

The params parameter returns a single Boolean value indicating whether the bytes of 2-byte and 4-byte pixel indexes and components are swapped before being written to memory. See glPixelStore.

GL_PERSPECTIVE_CORRECTION_HINT

The params parameter returns one value: a symbolic constant indicating the mode of the perspective correction hint. See glHint2FQ71VE.

GL_PIXEL_MAP_A_TO_A_SIZE

The params parameter returns one value: the size of the alpha-to-alpha pixel-translation table. See glPixelMap113L0UI.

GL_PIXEL_MAP_B_TO_B_SIZE

The params parameter returns one value: the size of the blue-to-blue pixel-translation table. See glPixelMap.

GL_PIXEL_MAP_G_TO_G_SIZE

The params parameter returns one value: the size of the green-to-green pixel-translation table. See glPixelMap113L0UI.

GL_PIXEL_MAP_I_TO_A_SIZE

The params parameter returns one value: the size of the index-to-alpha pixel translation table. See glPixelMap.

GL_PIXEL_MAP_I_TO_B_SIZE

The params parameter returns one value: the size of the index-to-blue pixel translation table. See glPixelMap113L0UI.

GL_PIXEL_MAP_I_TO_G_SIZE

The params parameter returns one value: the size of the index-to-green pixel-translation table. See glPixelMap.

GL_PIXEL_MAP_I_TO_I_SIZE

The params parameter returns one value: the size of the index-to-index pixel-translation table. See glPixelMap113L0UI.

GL_PIXEL_MAP_I_TO_R_SIZE

The params parameter returns one value: the size of the index-to-red pixel-translation table. See glPixelMap.

GL_PIXEL_MAP_R_TO_R_SIZE

The params parameter returns one value: the size of the red-to-red pixel-translation table. See glPixelMap113L0UI.

GL_PIXEL_MAP_S_TO_S_SIZE

The params parameter returns one value: the size of the stencil-to-stencil pixel translation table. See glPixelMap.

GL_POINT_SIZE

The params parameter returns one value: the point size as specified by glPointSizeHQOGCD.

GL_POINT_SIZE_GRANULARITY

The params parameter returns one value: the size difference between adjacent supported sizes for antialiased points. See glPointSize.

GL_POINT_SIZE_RANGE

The params parameter returns two values: the smallest and largest supported sizes for antialiased points. See glPointSizeHQOGCD.

GL_POINT_SMOOTH

The params parameter returns a single Boolean value indicating whether antialiasing of points is enabled. See glPointSize.

GL_POINT_SMOOTH_HINT

The params parameter returns one value: a symbolic constant indicating the mode of the point antialiasing hint. See glHint2FQ71VE.

GL_POLYGON_MODE

The params parameter returns two values: symbolic constants indicating whether front-facing and back-facing polygons are rasterized as points, lines, or filled polygons. See glPolygonMode1OYC7V5.

GL_POLYGON_SMOOTH

The params parameter returns a single Boolean value indicating whether antialiasing of polygons is enabled. See glPolygonMode.

GL_POLYGON_SMOOTH_HINT

The params parameter returns one value: a symbolic constant indicating the mode of the polygon antialiasing hint. See glHint2FQ71VE.

GL_POLYGON_STIPPLE

The params parameter returns a single Boolean value indicating whether stippling of polygons is enabled. See glPolygonStipple1N7CB5B.

GL_PROJECTION_MATRIX

The params parameter returns 16 values: the projection matrix on the top of the projection matrix stack. See glPushMatrix1MYNI2H.

GL_PROJECTION_STACK_DEPTH

The params parameter returns one value: the number of matrices on the projection matrix stack. See glPushMatrix.

GL_READ_BUFFER

The params parameter returns one value: a symbolic constant indicating which color buffer is selected for reading. See glReadPixels76DK080 and glAccum1AVT_KV.

GL_RED_BIAS

The params parameter returns one value: the red bias factor used during pixel transfers. See glPixelTransfer6MW9.AX.

GL_RED_BITS

The params parameter returns one value: the number of red bitplanes in each color buffer.

GL_RED_SCALE

The params parameter returns one value: the red scale factor used during pixel transfers. See glPixelTransfer6MW9.AX.

GL_RENDER_MODE

The params parameter returns one value: a symbolic constant indicating whether OpenGL is in render, select, or feedback mode. See glRenderMode4MC301H.

GL_RGBA_MODE

The params parameter returns a single Boolean value indicating whether OpenGL is in RGBA mode (TRUE) or color-index mode (FALSE). See glColorOOTFYK.

GL_SCISSOR_BOX

The params parameter returns four values: the x and y window coordinates of the scissor box, followed by its width and height. See glScissorK8Q9S3.

GL_SCISSOR_TEST

The params parameter returns a single Boolean value indicating whether scissoring is enabled. See glScissor.

GL_SHADE_MODEL

The params parameter returns one value: a symbolic constant indicating whether the shading mode is flat or smooth. See glShadeModel6IP7ZK.

GL_STENCIL_BITS

The params parameter returns one value: the number of bitplanes in the stencil buffer.

GL_STENCIL_CLEAR_VALUE

The params parameter returns one value: the index to which the stencil bitplanes are cleared. See glClearStencilX5JF07.

GL_STENCIL_FAIL

The params parameter returns one value: a symbolic constant indicating what action is taken when the stencil test fails. See glStencilOp1N11GRZ.

GL_STENCIL_FUNC

The params parameter returns one value: a symbolic constant indicating what function is used to compare the stencil reference value with the stencil buffer value. See glStencilFunc1NSO64P.

GL_STENCIL_PASS_DEPTH_FAIL

The params parameter returns one value: a symbolic constant indicating what action is taken when the stencil test passes, but the depth test fails. See glStencilOp1N11GRZ.

GL_STENCIL_PASS_DEPTH_PASS

The params parameter returns one value: a symbolic constant indicating what action is taken when the stencil test passes and the depth test passes. See glStencilOp.

GL_STENCIL_REF

The params parameter returns one value: the reference value that is compared with the contents of the stencil buffer. See glStencilFunc1NSO64P.

GL_STENCIL_TEST

The params parameter returns a single Boolean value indicating whether stencil testing of fragments is enabled. See glStencilFunc and glStencilOp1N11GRZ.

GL_STENCIL_VALUE_MASK

The params parameter returns one value: the mask that is used to mask both the stencil reference value and the stencil buffer value before they are compared. See glStencilFunc1NSO64P.

GL_STENCIL_WRITEMASK

The params parameter returns one value: the mask that controls writing of the stencil bitplanes. See glStencilMask11JIMMH.

GL_STEREO

The params parameter returns a single Boolean value indicating whether stereo buffers (left and right) are supported.

GL_SUBPIXEL_BITS

The params parameter returns one value: an estimate of the number of bits of subpixel resolution that are used to position rasterized geometry in window coordinates.

GL_TEXTURE_1D

The params parameter returns a single Boolean value indicating whether 1-D texture mapping is enabled. See glTexImage1D1HIX0MK.

GL_TEXTURE_2D

The params parameter returns a single Boolean value indicating whether 2-D texture mapping is enabled. See glTexImage2D1HIX0NK.

GL_TEXTURE_ENV_COLOR

The params parameter returns four values: the red, green, blue, and alpha values of the texture environment color. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glTexEnvUMZ9GQ.

GL_TEXTURE_ENV_MODE

The params parameter returns one value: a symbolic constant indicating which texture environment function is currently selected. See glTexEnv.

GL_TEXTURE_GEN_S

The params parameter returns a single Boolean value indicating whether automatic generation of the S texture coordinate is enabled. See glTexGen3IH49F3.

GL_TEXTURE_GEN_T

The params parameter returns a single Boolean value indicating whether automatic generation of the T texture coordinate is enabled. See glTexGen.

GL_TEXTURE_GEN_R

The params parameter returns a single Boolean value indicating whether automatic generation of the R texture coordinate is enabled. See glTexGen3IH49F3.

GL_TEXTURE_GEN_Q

The params parameter returns a single Boolean value indicating whether automatic generation of the Q texture coordinate is enabled. See glTexGen.

GL_TEXTURE_MATRIX

The params parameter returns 16 values: the texture matrix on the top of the texture matrix stack. See glPushMatrix1MYNI2H.

GL_TEXTURE_STACK_DEPTH

The params parameter returns one value: the number of matrices on the texture matrix stack. See glPushMatrix.

GL_UNPACK_ALIGNMENT

The params parameter returns one value: the byte alignment used for reading pixel data from memory. See glPixelStoreNHM7UO.

GL_UNPACK_LSB_FIRST

The params parameter returns a single Boolean value indicating whether single-bit pixels being read from memory are read first from the least significant bit of each unsigned byte. See glPixelStore.

GL_UNPACK_ROW_LENGTH

The params parameter returns one value: the row length used for reading pixel data from memory. See glPixelStoreNHM7UO.

GL_UNPACK_SKIP_PIXELS

The params parameter returns one value: the number of pixel locations skipped before the first pixel is read from memory. See glPixelStore.

GL_UNPACK_SKIP_ROWS

The params parameter returns one value: the number of rows of pixel locations skipped before the first pixel is read from memory. See glPixelStoreNHM7UO.

GL_UNPACK_SWAP_BYTES

The params parameter returns a single Boolean value indicating whether the bytes of 2-byte and 4-byte pixel indexes and components are swapped after being read from memory. See glPixelStore.

GL_VIEWPORT

The params parameter returns four values: the x and y window coordinates of the viewport, followed by its width and height. See glViewport3RI8.C6.

GL_ZOOM_X

The params parameter returns one value: the x pixel zoom factor. See glPixelZoomITNUQU.

GL_ZOOM_Y

The params parameter returns one value: the y pixel zoom factor. See glPixelZoom.

params

Returns the value or values of the specified parameter.

 

Remarks

These four functions return values for simple state variables in OpenGL. The pname parameter is a symbolic constant indicating the state variable to be returned, and params is a pointer to an array of the indicated type in which to place the returned data.

Type conversion is performed if params has a different type from the state variable value being requested. If you call glGetBooleanv, a floating-point or integer value is converted to GL_FALSE if and only if it is zero. Otherwise, it is converted to GL_TRUE.

If you call glGetIntegerv, Boolean values are returned as GL_TRUE or GL_FALSE, and most floating-point values are rounded to the nearest integer value. Floating-point colors and normals, however, are returned with a linear mapping that maps 1.0 to the most positive representable integer value and -1.0 to the most negative representable integer value.

If you call glGetFloatv or glGetDoublev, Boolean values are returned as GL_TRUE or GL_FALSE, and integer values are converted to floating-point values.

You can query many of the Boolean parameters more easily with glIsEnabled1MZ_ZK..

Error Codes

The following are the error codes generated and their conditions.

Error Code

Condition

GL_INVALID_ENUM

pname was not an accepted value.

GL_INVALID_OPERATION

glGet was called between a call to glBegin and the corresponding call to glEnd.

 

See Also

glAccum, glAlphaFunc, glBegin, glBlendFunc, glCallList, glClearAccum, glClearColor, glClearDepth, glClearIndex, glClearStencil, glClipPlane, glColor, glColorMask, glColorMaterial, glCullFace, glDepthFunc, glDepthMask, glDepthRange, glDrawBuffer, glEdgeFlag, glEnd, glFog, glFrontFace, glGetClipPlane, glGetError, glGetLight, glGetMap, glGetMaterial, glGetPixelMap, glGetPolygonStipple, glGetString, glGetTexEnv, glGetTexGen, glGetTexImage, glGetTexLevelParameter, glGetTexParameter, glHint, glIndex, glIndexMask, glIsEnabled, glLight, glLightModel, glLineStipple, glLineWidth, glListBase, glLogicOp, glMap1, glMap2, glMapGrid, glMatrixMode, glNewList, glNormal, glPixelMap, glPixelStore, glPixelTransfer, glPixelZoom, glPointSize, glPolygonMode, glPolygonStipple, glPushAttrib, glPushMatrix, glPushName, glRasterPos, glReadPixels, glScissor, glShadeModel, glStencilFunc, glStencilMask, glStencilOp, glTexCoord, glTexEnv, glTexGen, glTexImage1D, glTexImage2D, glViewport